<!DOCTYPE html>
<html>
 {include file="public/header" /}
<body>
  <div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
  	<div class="layui-form-item">
      <label class="layui-form-label">角色</label>
      <div class="layui-input-block">
        <select name="RoleID" lay-filter="selectBtn">
          {foreach $data as $vo}
            <option value=" {$vo.ID}">{$vo.Name}</option>
          {/foreach}
        </select>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">登录名</label>
      <div class="layui-input-inline">
        <input type="text" name="UserName" lay-verify="required" placeholder="请输入用户名" autocomplete="off" class="layui-input">
      </div>
    </div>
      <div class="layui-form-item">
          <label class="layui-form-label">手机号</label>
          <div class="layui-input-inline">
              <input type="text" name="Mobile" placeholder="请输入手机号" autocomplete="off" class="layui-input">
          </div>
      </div>
    <div class="layui-form-item">
      <label class="layui-form-label">真实姓名</label>
      <div class="layui-input-inline">
        <input type="tel" name="TrueName" lay-verify="required" placeholder="请输入真实姓名" autocomplete="off" class="layui-input" value="">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">MAC</label>
      <div class="layui-input-inline">
        <input type="tel" name="MAC"  placeholder="请输入MAC" autocomplete="off" class="layui-input" value="">
      </div>
    </div>

      <div class="layui-form-item layui-inline layui-col-lg-3">
          <label class="layui-form-label">登陆方式</label>
          <div class="layui-input-inline">
              <input type="checkbox" name="LoginType" lay-skin="switch" lay-text="手机|密码" checked>
          </div>
      </div>

      <input type="hidden" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="time" checked>

      <div class="layui-row layui-hide" id="TemplateField">
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">pv访问数</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="pvNum">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">ua点击数</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="uaNum">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">注册数量</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="zcNum">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">申请人数</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="sqNum">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">放款人数</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="fkNum">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">申请率</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="sqLv">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">放款率</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="fkLv">
              </div>
          </div>
          <div class="layui-form-item layui-inline layui-col-lg-3">
              <label class="layui-form-label">注册到uv率</label>
              <div class="layui-input-inline">
                  <input type="checkbox" name="TemplateField[]" lay-skin="switch" lay-text="显示|隐藏" value="zcUvLv">
              </div>
          </div>
      </div>

    <div class="layui-form-item layui-hide">
       <button class="layui-btn" lay-submit lay-filter="LAY-user-back-submit" id="LAY-user-back-submit">提交</button>

    </div>
  </div>
   {include file="public/footer" /}
  <script>
  layui.use(['form'], function(){
    var $ = layui.$
    ,form = layui.form ;
      //监听select表单事件 如果角色ID等于贷超 显示可控制字段 否则隐藏html显示
      form.on('select(selectBtn)', function(data){
          if(data.value == 48){
              $("#TemplateField").removeClass('layui-hide');
          }else{
              $("#TemplateField").addClass('layui-hide');
          }
      });
  })
  </script>

</body>
</html>